<?php

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/**
 * Description of AddQueueLineFormModel
 *
 * @author I062261
 */
class AddQueueLineFormModel extends CFormModel {

    public $queueLineName;
    public $queueLineDescription;
    public $isAddChildQueueLine;
    public $parentQueueLine;
    public $queueLineResourceName;
    public $queueLineResourceDescription;
    public $queueLineResourceMaxNumber;
    public $timeResourceType;
    public $queueLineStartTime;
    public $queueLineEndTime;
    // public $queueLineCycleLength;
    //public $queueLineCycleRepeatTimes;
    public $queueLineCycleEndTime;
    public $queueLineCycleLength;
    public $queueLineCycleRepeatTimes;
    public $allocateQueueStrategy;
    public $timeSlotLength;
    // public $timeSlotExpression;
    public $makeQueueCycleLength;
    public $makeQueueCycleOffset;
    public $makeQueueCycleLength2;
    public $makeQueueCycleOffset2;
    //public $makeQueueCycleLength;
    public $makeQueueCycleOption;
    public $makeQueueTimeSlotOption;
    // public $processQueueCycleLength;
    public $processQueueCycleOffset;
    public $processQueueCycleLength2;
    public $processQueueCycleOffset2;
    public $processQueueCycleLength;
    public $processQueueCycleOption;
    public $processQueueTimeSlotOption;
    public $makeQueueTimeSlotOffset;
    public $processQueueTimeSlotOffset;
    public $makeQueueTimeSlotLength;
    public $processQueueTimeSlotLength;
    public $makeQueueStrategy;
    public $processQueueStrategy;
    protected $_errors = array();

    public function rules() {
        return array(
            array('queueLineName', 'required', 'on' => 'basicInfo'),
            array('queueLineDescription', 'safe', 'on' => 'basicInfo'),
            array('parentQueueLine,isAddChildQueueLine', 'required', 'on' => 'addChildQueueLine'),
            array('queueLineResourceName', 'required', 'on' => 'addResource'),
            array('queueLineResourceDescription,queueLineResourceMaxNumber', 'safe', 'on' => 'addResource'),
            array('queueLineStartTime,queueLineEndTime,queueLineCycleLength,queueLineCycleRepeatTimes', 'safe', 'on' => 'addTimeResource'),
            array('allocateQueueStrategy', 'required', 'on' => 'addQueueStrategy'),
            array('timeSlotLength,
                makeQueueCycleLength,makeQueueCycleLength2,makeQueueCycleOffset,makeQueueCycleOffset2,makeQueueCycleOption,
                processQueueCycleOffset,processQueueCycleOffset2,processQueueCycleLength,processQueueCycleLength2,processQueueCycleOption,
                makeQueueTimeSlotOption,processQueueTimeSlotOption,
                makeQueueTimeSlotOffset,processQueueTimeSlotOffset,makeQueueTimeSlotLength,processQueueTimeSlotLength,
                makeQueueStrategy,processQueueStrategy
                ', 'safe', 'on' => 'addQueueStrategy'),
        );
    }

    /**
     * Declares attribute labels.
     */
    public function attributeLabels() {
        return array(
                /*
                  'queueLineName' => 'Queue-Line Name:',
                  'queueLineDescription' => 'Description:',
                  'queueLineMember' => 'Who Can Make Queue:',
                  'queueLineAdmin' => 'Who Can Process Queue:',
                  'addType' => 'What Type of Queue-Line to Add:',
                  'timeLineType' => 'Timeline Type:',
                  'oneTimeTimeUnit' => 'OneTime QueueLine Time Unit:',
                  'recursiveInterval' => 'Recursive QueueLine Interval:',
                  'startTime' => 'Set Start Time:',
                  'timeLength' => 'Set Time Length:',
                  'periodWorkingTime' => 'Working Time Period(Can Change):',
                  'periodWeekdays' => 'Weekdays Period(Can Change):',
                  'pickupType' => 'Pick up active(inactive) time:'
                 * 
                 */
        );
    }

}

?>
